//
//  ViewController.m
//  Vacations
//
//  Created by User-23 on 10/31/14.
//  Copyright (c) 2014 TrainingCamp. All rights reserved.
//

#import "ViewController.h"
#import "Info.h"
#import "Vacation.h"
#import "PlaceInfoViewController.h"

@interface ViewController ()

@end

@implementation ViewController


- (IBAction)vacationButtonAction:(UIButton *)sender {
    
    PlaceInfoViewController* infoVC = [[PlaceInfoViewController alloc] initWithNibName:nil bundle:nil];
    infoVC.navigationItem.title = sender.titleLabel.text;
    infoVC.senderButtonTag = sender.tag;
    [self.navigationController pushViewController:infoVC animated:YES];

}

- (void) viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.hidden = YES;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    VacationBook* oneVac = [VacationBook sheredVacationBook];
    [oneVac generateVacation];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
